package com.future.direction.ui.activity;

import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.TextView;

import com.future.direction.R;
import com.future.direction.common.Constant;
import com.future.direction.common.util.StringUtil;
import com.future.direction.di.component.AppComponent;
import com.future.direction.interfaces.OnMultiClickListener;
import com.future.direction.ui.widget.MyTitleBar;

import butterknife.BindView;

/**
 * Created by zhp on 2019-11-08
 */
public class RechargeActivity extends BaseActivity {
    @BindView(R.id.titleBar)
    MyTitleBar titleBar;
    @BindView(R.id.tv_diamond_number)
    TextView tvDiamondNumber;
    @BindView(R.id.ll_diamonds)
    LinearLayout llDiamonds;
    @BindView(R.id.tv_rmb)
    TextView tvRmb;
    @BindView(R.id.ll_rmb)
    LinearLayout llRmb;
    @BindView(R.id.rbs_pay)
    RadioGroup rbsPay;
    @BindView(R.id.button_sure)
    Button buttonSure;

    @Override
    public int setLayout() {
        return R.layout.activity_recharge;
    }

    @Override
    public void getExtras() {
        String from = getIntent().getStringExtra(Constant.from);
        if (StringUtil.isNullString(from)) {
            llDiamonds.setVisibility(View.GONE);
        } else {
            llDiamonds.setVisibility(View.VISIBLE);
        }
        ((RadioButton) rbsPay.getChildAt(0)).setChecked(true);
    }

    @Override
    public boolean init() {
        return false;
    }

    @Override
    public void setListener() {
        backListener(titleBar);
        buttonSure.setOnClickListener(new OnMultiClickListener() {
            @Override
            public void onMultiClick(View v) {
                //TODO
            }
        });
    }

    @Override
    public void setupAcitivtyComponent(AppComponent appComponent) {

    }

}